﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace vue
{
    public partial class DialogueRechercheAvancee : Form
    {

        private vue.Vue acces;
        private List<Modele.Balise> balises;
        private List<System.Drawing.Bitmap> images_balises;
        private List<System.Windows.Forms.Button> buttons;

        public DialogueRechercheAvancee(vue.Vue _vue, List<Modele.Balise> _balises ,List<System.Drawing.Bitmap> _images_balises)
        {
            acces = _vue;
            balises = _balises;
            images_balises = _images_balises;
            buttons = new List < System.Windows.Forms.Button >();
            InitializeComponent();
            this.miseAjour();
            this.Refresh();
        }
        //mise à jour
        public void miseAjour()
        {
            System.Drawing.Size taille = button2.Size;
            IEnumerator it = images_balises.GetEnumerator();
            //ajout de la balise par defaut
            it.MoveNext();

            buttons.Add(button2);
            System.Drawing.Bitmap image_tampon = (System.Drawing.Bitmap)it.Current;
            image_tampon = new System.Drawing.Bitmap(image_tampon, taille);

            button2.BackgroundImage = image_tampon;

            

        }

        private void DialogueRechercheAvancee_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
